{if $full_page}
<!-- $Id: user_account_list.htm 17030 2010-02-08 09:39:33Z sxc_shop $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<script type="text/javascript" src="../js/calendar.php"></script>
<script type="text/javascript" src="js/jPicker/jquery-1.4.4.min.js"></script> 
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="form-div">
  <form action="javascript:searchUser()" name="searchForm">
    <img src="images/icon_search.gif" width="25" height="22" border="0" alt="SEARCH" />
    客户编号 <input type="text" name="user_id" size="10" />
	充值方式
      <select name="pay_code">
        <option value="">请选择</option>
		<!--{foreach from=$pay_lists item=item}-->
        <option value="{$item.pay_code}" >{$item.pay_name}</option>
	    <!--{/foreach }-->
	    </select>
	  <!-- 新增y-6.28时间 开始-->
	  <p>
	充值时间
	 <span style="margin:10px 10px;"> 
      <input type="text" class="time" name="start_time" maxlength="60" size="20" readonly="readonly" id="start_time_id" />
      <input name="start_time_btn" type="button" id="start_time_btn" onclick="return showCalendar('start_time_id', '%Y-%m-%d %H:%M', '24', false, 'start_time_btn');" value="{$lang.btn_select}" class="button"/>
      ~      
      <input type="text" class="time" name="end_time" maxlength="60" size="20" readonly="readonly" id="end_time_id" />
      <input name="end_time_btn" type="button" id="end_time_btn" onclick="return showCalendar('end_time_id', '%Y-%m-%d %H:%M', '24', false, 'end_time_btn');" value="{$lang.btn_select}" class="button"/>
	  <span id="qingchu" class="button Y-dele" onclick="">清除</span>
	 </span>
	 </p>
	 <p>
	 使用时间
	 <span style="margin:10px 10px;"> 
      <input type="text" class="time1" name="start_change_time" maxlength="60" size="20" readonly="readonly" id="start_change_id" />
      <input name="start_change_btn" type="button" id="start_change_btn" onclick="return showCalendar('start_change_id', '%Y-%m-%d %H:%M', '24', false, 'start_change_btn');" value="{$lang.btn_select}" class="button"/>
      ~      
      <input type="text" class="time1" name="end_change_time" maxlength="60" size="20" readonly="readonly" id="end_change_id" />
      <input name="end_change_btn" type="button" id="end_change_btn" onclick="return showCalendar('end_change_id', '%Y-%m-%d %H:%M', '24', false, 'end_change_btn');" value="{$lang.btn_select}" class="button"/>
	  <span id="qingchu1" class="button Y-dele" onclick="">清除</span>
	 </span>
	 </p>

	<!-- 新增y-6.28提现时间 结束-->
	  
      <input type="submit" value="{$lang.button_search}" class="button" />

  </form>

</div>

<form method="POST" action="" name="listForm">
<!-- start user_deposit list -->
<div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>交易流水号</th>
    <th>客户编号</th>
    <th>客户姓名</th>
    <th>充值时间</th>
    <th>充值金额</th>
    <th>充值方式</th>
    <th>使用时间</th>
    <th>订单号</th>
    <th>使用金额</th>
    <th>账户余额</th>
  </tr>
  
  {foreach from=$list item=item}
  <tr>
    <td align="center">{$item.log_id}</td>
    <td align="center">{$item.user_id}</td>
    <td align="center">{$item.user_name}</td>
    <td align="center">
	{if $item.change_type eq '0'}
	  {$item.change_time}
	{/if}
	</td>
    <td align="center">
	{if $item.change_type eq '0'}
	  {$item.user_money}
	{/if}
	</td>
    <td align="center">
	{if $item.change_type eq '0'}
	  {$item.pay_name}
	{/if}
	</td>
    <td align="center">
	{if $item.change_type eq '99'}
	  {$item.change_time}
	{/if}
	</td>
    <td align="center">
	{if $item.change_type eq '99'}
	  {$item.order_sn}
	{/if}
    </td>
	<td align="center">
	{if $item.change_type eq '99'}
	  {$item.user_money}
	{/if}
    </td>
	<td align="center">
	
	  {$item.new_money}

    </td>
	
  </tr>
  {foreachelse}
  <tr>
    <td class="no-records" colspan="8">{$lang.no_records}</td>
  </tr>
  {/foreach}

<table id="page-table" cellspacing="0">
<tr>

  <td><!-- 导出订单功能开始 this.form.target = '_blank'-->
	<span class="button Y-dele" onclick="exports();">导出订单</span>
	<!-- 导出订单功能结束 --></td>
  <td align="right" nowrap="true">

  {include file="page.htm"}
  </td>
</tr>
</table>
{if $full_page}
</div>
  
<!-- end user_deposit list -->
</form>

<script type="text/javascript" language="JavaScript">
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};
{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}
{literal}
<!--

onload = function()
{
    // 开始检查订单
    startCheckOrder();
}
/**
 * 搜索用户
 */
function searchUser()
{
    listTable.filter['user_id'] = Utils.trim(document.forms['searchForm'].elements['user_id'].value);
    listTable.filter['pay_code'] = document.forms['searchForm'].elements['pay_code'].value;

	//Y-6.30 新增 
	listTable.filter['start_time'] = document.forms['searchForm'].elements['start_time'].value;
	listTable.filter['end_time'] = document.forms['searchForm'].elements['end_time'].value;
	
	listTable.filter['start_change_time'] = document.forms['searchForm'].elements['start_change_time'].value;
	listTable.filter['end_change_time'] = document.forms['searchForm'].elements['end_change_time'].value;
	
	
	
	
    listTable.filter['page'] = 1;
    listTable.loadList();
}

/*20170628  YZ */
	function exports(){
	  
	    /*获取搜索框的值*/
	var	user_id = Utils.trim(document.forms['searchForm'].elements['user_id'].value);
	var	pay_code = document.forms['searchForm'].elements['pay_code'].value;

		//Y-6.30 新增 
	var	start_time = document.forms['searchForm'].elements['start_time'].value;
	var	end_time = document.forms['searchForm'].elements['end_time'].value;
		
	var	start_change_time = document.forms['searchForm'].elements['start_change_time'].value;
	var	end_change_time = document.forms['searchForm'].elements['end_change_time'].value;
		

		
	   /*链接组合*/
	   var urls = "export.php?act=acc_export&user_id="+user_id+"&pay_code="+pay_code+"&start_change_time="+start_change_time+"&end_change_time="+end_change_time+"&start_time="+start_time+"&end_time="+end_time;
	   
	   /*跳转链接*/
	   /*window.location.href = urls; */
	     window.open(urls);
	
	}



/**
 * 清除所选时间
 */
$(function(){ 
		function qingchu(id,clas){
		
		 $('#'+id).click(function(){  
		 
		 $('.'+clas).val(""); 

		});
		}
			qingchu('qingchu','time');
			qingchu('qingchu1','time1');

	  }); 
//-->
</script>
{/literal}
{include file="pagefooter.htm"}
{/if}